package com.demo.my.Service;

import com.demo.my.Dao.LeaveDao;
import com.demo.my.Entity.Leave;
import com.demo.my.Entity.LeaveInfoDTO;

import java.util.List;

import com.demo.my.Dao.LeaveDao;
import com.demo.my.Entity.Leave;

import java.sql.SQLException;

public class LeaveService {
    private LeaveDao leaveDao=new LeaveDao();
    public List<LeaveInfoDTO> getLeaveList() throws Exception {
      return  leaveDao.getLeaveList();
    }
    public void addLeave(Leave leave) throws SQLException {
        leaveDao.addLeave(leave);
    }

    public List<LeaveInfoDTO> getLeaveList(Integer employeeNumber) throws Exception {
        return  leaveDao.getLeaveList(employeeNumber);
    }

    public List<LeaveInfoDTO> getLeaveNoList() throws Exception {
        return leaveDao.getLeaveNoList();
    }

    public List<LeaveInfoDTO> getLeaveListById(String id) throws Exception {
        return leaveDao.getLeaveListById(id);
    }

    public void changeStatus(String id) throws SQLException {
        leaveDao.changeStatus(id);
    }
}
